/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-08-08
 * Time: 14:35
 */
public class Test {
    public static void rotate(int[] nums, int k) {
        int right = nums.length-1;
        int left = 0;

    }
    public static int removeElement(int[] nums, int val) {
        int len = 0;
        int left = 0;
        for (int i = 0; i < nums.length; i++) {
            if(nums[i] != val){
                nums[left] = nums[i];
                len++;
                left++;
            }
        }
        return len;
    }

    public static void main(String[] args) {
        int[] nums = {1,2,2,3,5,2,7};
        int ret = removeElement(nums,2);
        System.out.println(ret);
    }
    public static void main1(String[] args) {
        int[] nums = {1,2,3,4,5,6,7};
        rotate(nums,3);
        for (int x: nums) {
            System.out.print(x + " ");
        }
    }
/*    public static void main(String[] args) {
        float []f[] = new float[6][6];
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j < 6; j++) {
                f[i][j] = j;
                System.out.print(f[i][j] + " ");
            }
            System.out.println();
        }
    }*/
}
